//
//  rand0.c
//  c_pr
//
//  Created by chenyh on 2021/1/18.
//

#include <stdio.h>

static unsigned long int next = 1; /*种子*/

unsigned int rand0 (void)
{
    //生成伪随机数的魔术公式
    next = next * 1103515245 + 123456;
    return (unsigned int) (next / 65536) % 32768;
}
